
import { defineStore } from 'pinia'
import { ref,reactive } from 'vue'
export const useUserStore = defineStore('userStore', ()=>{
    let userinfo=ref()
	const setUser=(val)=> {
        userinfo.value = val
    }
    const delUser=()=> {
        userinfo.value = null
    }

    return {
        userinfo,
        setUser,
        delUser
    }
},{
    persist: {
        key: 'userStore',
        storage: localStorage
    }
})